Optimal. Leaf size=71 \[ \frac {(b d-2 a e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a \sqrt {b^2-4 a c}}-\frac {d \log \left (a+b x+c x^2\right )}{2 a}+\frac {d \log (x)}{a} \]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {800, 634, 618, 206, 628} \begin {gather*} \frac {(b d-2 a e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a \sqrt {b^2-4 a c}}-\frac {d \log \left (a+b x+c x^2\right )}{2 a}+\frac {d \log (x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 800
Rubi steps
\begin {align*} \int \frac {d+e x}{x \left (a+b x+c x^2\right )} \, dx &=\int \left (\frac {d}{a x}+\frac {-b d+a e-c d x}{a \left (a+b x+c x^2\right )}\right ) \, dx\\ &=\frac {d \log (x)}{a}+\frac {\int \frac {-b d+a e-c d x}{a+b x+c x^2} \, dx}{a}\\ &=\frac {d \log (x)}{a}-\frac {d \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 a}+\frac {(-b d+2 a e) \int \frac {1}{a+b x+c x^2} \, dx}{2 a}\\ &=\frac {d \log (x)}{a}-\frac {d \log \left (a+b x+c x^2\right )}{2 a}-\frac {(-b d+2 a e) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a}\\ &=\frac {(b d-2 a e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a \sqrt {b^2-4 a c}}+\frac {d \log (x)}{a}-\frac {d \log \left (a+b x+c x^2\right )}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 71, normalized size = 1.00 \begin {gather*} -\frac {\frac {2 (b d-2 a e) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+d (\log (a+x (b+c x))-2 \log (x))}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {d+e x}{x \left (a+b x+c x^2\right )} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 228, normalized size = 3.21 \begin {gather*} \left [-\frac {{\left (b^{2} - 4 \, a c\right )} d \log \left (c x^{2} + b x + a\right ) - 2 \, {\left (b^{2} - 4 \, a c\right )} d \log \relax (x) + \sqrt {b^{2} - 4 \, a c} {\left (b d - 2 \, a e\right )} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right )}{2 \, {\left (a b^{2} - 4 \, a^{2} c\right )}}, -\frac {{\left (b^{2} - 4 \, a c\right )} d \log \left (c x^{2} + b x + a\right ) - 2 \, {\left (b^{2} - 4 \, a c\right )} d \log \relax (x) - 2 \, \sqrt {-b^{2} + 4 \, a c} {\left (b d - 2 \, a e\right )} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right )}{2 \, {\left (a b^{2} - 4 \, a^{2} c\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 72, normalized size = 1.01 \begin {gather*} -\frac {d \log \left (c x^{2} + b x + a\right )}{2 \, a} + \frac {d \log \left ({\left | x \right |}\right )}{a} - \frac {{\left (b d - 2 \, a e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 100, normalized size = 1.41 \begin {gather*} -\frac {b d \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a}+\frac {2 e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}+\frac {d \ln \relax (x )}{a}-\frac {d \ln \left (c \,x^{2}+b x +a \right )}{2 a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.95, size = 375, normalized size = 5.28 \begin {gather*} \ln \left (a^2\,e\,\sqrt {b^2-4\,a\,c}-2\,a\,b^2\,d+a^2\,b\,e+6\,a^2\,c\,d-2\,b^3\,d\,x-2\,a\,b\,d\,\sqrt {b^2-4\,a\,c}+a\,b^2\,e\,x-2\,a^2\,c\,e\,x-2\,b^2\,d\,x\,\sqrt {b^2-4\,a\,c}+7\,a\,b\,c\,d\,x+a\,b\,e\,x\,\sqrt {b^2-4\,a\,c}+3\,a\,c\,d\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {2\,a\,e\,\sqrt {b^2-4\,a\,c}-b\,d\,\sqrt {b^2-4\,a\,c}}{2\,a\,b^2-8\,a^2\,c}-\frac {d}{2\,a}\right )-\ln \left (a^2\,e\,\sqrt {b^2-4\,a\,c}+2\,a\,b^2\,d-a^2\,b\,e-6\,a^2\,c\,d+2\,b^3\,d\,x-2\,a\,b\,d\,\sqrt {b^2-4\,a\,c}-a\,b^2\,e\,x+2\,a^2\,c\,e\,x-2\,b^2\,d\,x\,\sqrt {b^2-4\,a\,c}-7\,a\,b\,c\,d\,x+a\,b\,e\,x\,\sqrt {b^2-4\,a\,c}+3\,a\,c\,d\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {2\,a\,e\,\sqrt {b^2-4\,a\,c}-b\,d\,\sqrt {b^2-4\,a\,c}}{2\,a\,b^2-8\,a^2\,c}+\frac {d}{2\,a}\right )+\frac {d\,\ln \relax (x)}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________